package com.xingkeduo.business.order.remote.feign;


import com.xingkeduo.dto.payment.PayeeOrderResponseDto;
import com.xingkeduo.dto.payment.RefundDto;
import com.xingkeduo.utils.ResponseUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "business-payment")
public interface PaymentFeignService{

    @PostMapping("/payment/to_pay")
    ResponseUtils toPay(@RequestBody String payeeOrderParam);

    @PostMapping("/payment/refund")
    ResponseUtils<PayeeOrderResponseDto> refund(@RequestBody RefundDto refundDto);

    /**
     * 订单状态查询
     */
    @GetMapping("/payment/query/{merchantId}/{outTradeNo}")
    ResponseUtils<PayeeOrderResponseDto> query(@PathVariable(value="merchantId") String merchantId, @PathVariable(value="outTradeNo") String outTradeNo);
}
